{{if !isset($form_table['base']['is_fields_sel']) or $form_table['base']['is_fields_sel'] eq 1}}
    <div class="am-popup popup-not-title" id="form-table-fields-popup">
        <div class="am-popup-inner">
            <span data-am-modal-close class="am-close am-close-alt">&times;</span>
            <div class="am-popup-bd am-padding-0">
                <form class="am-form am-form-full-screen am-form-popup-fixed">
                    <div class="form-table-fields-select-container">
                        <div class="form-table-fields-list-container">
                            {{if !empty($form_user_fields)}}
                                <div class="am-alert am-margin-bottom-0">
                                    <p>{{:MyLang('form_table_column_sort_tips')}}</p>
                                </div>
                                <ul class="am-list am-list-static am-list-striped am-margin-bottom-0 form-table-fields-content-container">
                                    {{foreach $form_user_fields as $v}}
                                        <li>
                                            <label class="am-checkbox-inline">
                                                <input type="checkbox" name="form_field_checkbox_value" value="{{$v.key}}" data-original-name="{{$v.label}}" data-am-ucheck {{if isset($v['checked']) and $v['checked'] eq 1}}checked{{/if}} />
                                                <span>{{$v.label}}</span>
                                            </label>
                                        </li>
                                    {{/foreach}}
                                </ul>
                            {{else /}}
                                {{include file="public/not_data" /}}
                            {{/if}}
                        </div>
                        <div class="am-form-popup-submit">
                            <button type="button" class="am-btn am-btn-default am-radius am-btn-xs am-fl form-table-field-checkbox-submit" data-value="{{if array_sum(array_column($form_user_fields, 'checked')) gt 0}}1{{else /}}0{{/if}}" data-checked-text="{{:MyLang('reverse_select_title')}}" data-not-checked-text="{{:MyLang('select_all_title')}}">
                            {{if array_sum(array_column($form_user_fields, 'checked')) gt 0}}{{:MyLang('reverse_select_title')}}{{else /}}{{:MyLang('select_all_title')}}{{/if}}</button>

                            <button type="button" class="am-btn am-btn-warning am-radius am-btn-xs btn-loading-example am-margin-right-lg" data-am-modal-close>
                                <i class="am-icon-paint-brush"></i>
                                <span>{{:MyLang('cancel_title')}}</span>
                            </button>
                            <button type="button" class="am-btn am-btn-danger am-radius am-btn-xs btn-loading-example am-margin-right-lg submit-ajax" data-url="{{:MyUrl('admin/formtable/fieldsselectreset')}}" data-id="{{$form_md5_key}}" data-key="md5_key" data-view="reload" data-is-confirm="0" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('reset_title')}}'}">
                                <i class="am-icon-filter"></i>
                                <span>{{:MyLang('reset_title')}}</span>
                            </button>
                            <button type="button" class="am-btn am-btn-primary am-radius am-btn-xs btn-loading-example form-table-field-confirm-submit" data-url="{{:MyUrl('admin/formtable/fieldsselectsave')}}" data-am-loading="{spinner: 'circle-o-notch', loadingText:'{{:MyLang('confirm_title')}}'}">
                                <i class="am-icon-check"></i>
                                <span>{{:MyLang('confirm_title')}}</span>
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
{{/if}}